package com.hfjava.ebook.entity;

import com.fasterxml.jackson.annotation.ObjectIdGenerators;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;

public class Book implements Serializable {
    private Integer id;//图书编号
    private Integer categoryId;//图书分类编号
    private String title;//书名
    private String pester;//图书封面
    private String author;//作者
    private Date createDate;//出版时间
    private Integer storage;//库存
    private Integer status;// 状态   0表示未上架   1表示已上架
    private String publisher;//出版社
    private BigDecimal normalPrice;//售价
    private BigDecimal paperPrice;//纸质售价
    private Integer hits;//阅读次数
    private Integer deleteFlag;//删除标识  0表示未删除  1表示已删除

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    private Category category;//图书分类对象

    public Book() {
    }

    public BigDecimal getPaperPrice() {
        return paperPrice;
    }

    public void setPaperPrice(BigDecimal paperPrice) {
        this.paperPrice = paperPrice;
    }

    public Integer getHits() {
        return hits;
    }

    public void setHits(Integer hits) {
        this.hits = hits;
    }

    public Book(Integer id, Integer categoryId, String title, String pester, String author, Date createDate, Integer storage, Integer status, String publisher, BigDecimal normalPrice, BigDecimal paperPrice, Integer hits, Category category,Integer deleteFlag) {
        this.id = id;
        this.categoryId = categoryId;
        this.title = title;
        this.pester = pester;
        this.author = author;
        this.createDate = createDate;
        this.storage = storage;
        this.status = status;
        this.publisher = publisher;
        this.normalPrice = normalPrice;
        this.paperPrice = paperPrice;
        this.hits = hits;
        this.category = category;
        this.deleteFlag = deleteFlag;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPester() {
        return pester;
    }

    public void setPester(String pester) {
        this.pester = pester;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getStorage() {
        return storage;
    }

    public void setStorage(Integer storage) {
        this.storage = storage;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public BigDecimal getNormalPrice() {
        return normalPrice;
    }

    public void setNormalPrice(BigDecimal normalPrice) {
        this.normalPrice = normalPrice;
    }

    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }
}
